<?php

namespace Admin\Model;
use Think\Model\ViewModel;

class SalesOrderReportViewModel extends ViewModel{
	
	protected $connection = "ETS_DB_CONFIG";
	Protected $autoCheckFields = false;
	
	public $viewFields = array(
		'sales_order_items'=>array('price','is_overseaship', 'country_name','row_total','id','increment_id','customer_orderid','order_item_id','customer_name','order_currency_code','erp_sku','qty_ordered','name','base_price','base_row_total','rmb_price','rmb_row_total','sku','qty_shipped','qty_return','status' ),
	    'sales_order'=>array('risk','grand_total', 'country_id','base_grand_total','platform','status'=>'order_status',"payment_status",'last_trans_id','increment_id'=>'p_increment_id','real_increment_id','created_at','review_date','customer_id','firstname','middlename','lastname','dealer','customer_email','_on'=>'sales_order_items.increment_id=sales_order.increment_id'),
		'userets'=>array('account','department_id','_on'=>'sales_order.dealer=userets.account' ,'_type'=>'LEFT'),
	);
} 
